package org.example.designPattern.creation.factory.v3;

import org.example.designPattern.creation.factory.Dough;
import org.example.designPattern.creation.factory.Pizza1;
import org.example.designPattern.creation.factory.Sauce;

public class PizzaStoreV3 {
    private IPizzaFactory iPizzaFactory;

    public PizzaStoreV3 (IPizzaFactory iPizzaFactory){
        this.iPizzaFactory = iPizzaFactory;
    }

    /**
    * 获得工厂的的“面团”产品
    * */
    public Dough getDough(){
        return iPizzaFactory.createDough();
    }

    /**
    * 获得工厂的“酱料”产品
    * */
    public Sauce getSauce(){
        return iPizzaFactory.createSauce();
    }
}
